package com.feihao.zhou.demo02;

import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;


//键盘录入信息保存在硬盘
public class FileWriteAndReadTest {
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);

        System.out.println("请输入用户名：");
        String name = sc.next();
        System.out.println("请输入密码：");
        String password = sc.next();

        FileWriter fw = new FileWriter("day13-code-WriteAndRead\\message.txt");

        fw.write(name);
        fw.write("\r\n");
        fw.write(password);

        fw.close();

    }
}
